﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace LanguageSchool.Model
{
    public class ScheduleMeta
    {
        public Shedule Lesson { get; private set; }
        public Teacher ScheduleTeacher
        {
            get { return Lesson.Teacher; }
            set { Lesson.Teacher = value; }
        }

        public IEnumerable<Teacher> Teachers
        {
            get { return LinksProvider.Context.Teachers.ToList(); }
        }

        public Class ScheduleClass
        {
            get { return Lesson.Class; }
            set { Lesson.Class = value; }
        }

        public IEnumerable<Class> Classes
        {
            get { return LinksProvider.Context.Classes.ToList(); }
        }

        public Classroom ScheduleClassroom
        {
            get { return Lesson.Classroom; }
            set { Lesson.Classroom = value; }
        }

        public IEnumerable<Classroom> Classrooms
        {
            get { return LinksProvider.Context.Classrooms.ToList(); }
        }
        
        public ScheduleMeta(Shedule lesson) 
        {
            this.Lesson = lesson;
        }
    }
}
